Skip to content

feat: enable TypeScript strict mode#2761

Merged
setchy merged 8 commits intomainfrom
enable-strict-mode
Apr 3, 2026
Merged

feat: enable TypeScript strict mode#2761
setchy merged 8 commits intomainfrom
enable-strict-mode

Conversation

@afonsojramos
Copy link
Copy Markdown
Member

Summary

  • Enables "strict": true in tsconfig.json
  • Fixes ~292 strict mode errors across 94 files
  • Makes generic onMainEvent/handleMainEvent IPC helpers to avoid type casting at every call site
  • Adds proper null guards in notification handlers (discussion, issue, pullRequest)
  • Changes timer hooks to accept number | null delay parameter
  • Updates globalError type from GitifyError to GitifyError | undefined
  • Converts null to undefined in optional Gitify type fields for consistency
  • Adds err as Error casts in catch blocks
  • All 931 tests pass

Test plan

  • pnpm tsc --noEmit passes with zero errors
  • All 133 test files pass (931 tests)
  • Biome lint and format checks pass

@github-actions github-actions bot added the enhancement New feature or enhancement to existing functionality label Apr 2, 2026
Copy link
Copy Markdown
Member

@setchy setchy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @afonsojramos - spotted a few areas of feedback, will provide more detail when I'm in front of my computer next (currently on mobile)

@afonsojramos afonsojramos requested a review from setchy April 3, 2026 00:55
setchy added 2 commits April 2, 2026 22:26
Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
@setchy setchy merged commit 27b9554 into main Apr 3, 2026
9 checks passed
@setchy setchy deleted the enable-strict-mode branch April 3, 2026 02:30
@github-actions github-actions bot added this to the Release 7.0.0 milestone Apr 3, 2026
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 3, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
68.5% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or enhancement to existing functionality

Development

Successfully merging this pull request may close these issues.

2 participants